home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SPACE 2
/
SPACE - Library 2 - Volume 1.iso
/
apps
/
29
/
pascal
/
procpass.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1985-11-19
|
2KB
|
66 lines
program procedurepass;
{
PROGRAM: OSS PASCAL EXAMPLE to Demonstrate The Use of the 'superexec'
xbios call.
This program reads a variable _hz_200 (the 200hz system clock)
which is in protected memory.
AUTHOR: John D. Hays, Redmond, Washington
CIS: 72725,424
UUCP: uw-beaver!uw-june!bcsaic!apcisea!hays [BEST WAY]
Genie: kd7uw
W0RLInet: kd7uw @ wb7dch
TARGET HOST: 1040ST, COLOR. TESTED as *.TOS PROGRAM
DATE: 7 July 1986
DISCLAIMER: This code carries no warranty, expressed or implied. It is
placed in the PUBLIC DOMAIN for private use. Commercial use
requires the written consent of the author.
}
type
special = packed record
instr : integer;
source : long_integer;
dest : long_integer;
retrn : integer;
resul : long_integer;
end;
special_ptr = ^special;
convt = record
case foo : integer of
1 : ( i : long_integer );
2 : ( p : special_ptr );
end;
var
n : integer;
rip : convt;
fig : special_ptr;
procedure superexec(dummy : special_ptr); xbios(38);
begin
new(fig);
fig^.instr := $23F9; {MOVE.L SOURCE,DEST}
fig^.source := $4BA; {SOURCE ADDRESS}
rip.p := fig;
fig^.dest := rip.i + 12; {DESTINATION := ADDR OF RESULT}
fig^.retrn := $4E75; {RTS}
for n := 1 to 100 do begin
superexec(fig);
writeln(fig^.resul:10:h,n:10);
end;
write('Hit Return');
readln
end.
**************************************************************************************